package lab02.Text06;

public class Circle {
    //  半径
    double radius;
    //  面积和周长
    double area(){
        return 3.14 * radius * radius;
    }
    double perimeter(){
        return 2 * 3.14 * radius;
    }
    //  构造函数
    public Circle(double radius){
        this.radius = radius;
    }
    //  main函数
    public static void main(String[] args){
        Circle circle = new Circle(10);
        circle.area();
        circle.perimeter();